#include "vmx_minstate.h"
+#define MINSTATE_VIRT /* needed by minstate.h */
+#include "minstate.h"
#define VMX_FAULT(n) \
vmx_fault_##n:; \
- br.sptk vmx_fault_##n; \
+ br.sptk.many dispatch_to_fault_handler; \
;; \
;;
.mem.offset 0,0; st8.spill [r16]=r13,16
.mem.offset 8,0; st8.spill [r17]=r8,16 /* save ar.fpsr */
- mov r13=r21 /* establish `current' */
+ MINSTATE_GET_CURRENT(r13)
;;
.mem.offset 0,0; st8.spill [r16]=r15,16
.mem.offset 8,0; st8.spill [r17]=r14,16
#endif
{
if (iim == 0)
- die_if_kernel("bug check", regs, iim);
+ vmx_die_if_kernel("Break 0 in Hypervisor.", regs, iim);
if (!user_mode(regs)) {
/* Allow hypercalls only when cpl = 0. */
* suitable spot...
*/
-ENTRY(dispatch_to_fault_handler)
+GLOBAL_ENTRY(dispatch_to_fault_handler)
/*
* Input:
* psr.ic: off
#include <public/sched.h>
#include <asm/vhpt.h>
#include <asm/debugger.h>
+#include <asm/vmx.h>
#include <asm/vmx_vcpu.h>
#include <asm/vcpu.h>
domain_crash_synchronous();
}
+void vmx_die_if_kernel(char *str, struct pt_regs *regs, long err) /* __attribute__ ((noreturn)) */
+{
+ if (vmx_user_mode(regs))
+ return;
+
+ printk("%s: %s %ld\n", __func__, str, err);
+ debugtrace_dump();
+ show_registers(regs);
+ domain_crash_synchronous();
+}
+
long
ia64_peek (struct task_struct *child, struct switch_stack *child_stack,
unsigned long user_rbs_end, unsigned long addr, long *val)
#define RR7_SWITCH_SHIFT 12 /* 4k enough */
#include <public/hvm/ioreq.h>
+#define vmx_user_mode(regs) (((struct ia64_psr *)&(regs)->cr_ipsr)->vm == 1)
#define VCPU_LID(v) (((u64)(v)->vcpu_id)<<24)